# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
# Maintainer:
pkgname=git-cola
pkgver=4.2.1
pkgrel=0
pkgdesc="GUI application for git built on Python & Qt"
url="https://git-cola.github.io"
arch="noarch !armhf !riscv64" # py3-qt6
license="GPL-2.0-or-later"
depends="python3 py3-qt6 py3-qtpy"
makedepends="py3-setuptools py3-setuptools_scm py3-gpep517 py3-installer py3-wheel"
checkdepends="py3-pytest py3-pytest-flake8"
subpackages="$pkgname-doc $pkgname-pyc"
source="git-cola-$pkgver.tar.gz::https://github.com/git-cola/git-cola/archive/v$pkgver.tar.gz"
# testsuite hangs after a while.
options="!check"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 1
}

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/git_cola*.whl
}

sha512sums="
1a9d63c985d3566f81edd3ed3debc4d499fa5147650d479f3b1bc833d08836a17d63a8eb23c1cd5c2c31f6f7202219fb77cacb628df8f85dd3d367dcdd110891  git-cola-4.2.1.tar.gz
"
